package com.cloud.school.bus.teacherhelper.protocol.classstudent;

import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;

import android.content.Context;
import android.text.TextUtils;

import com.cloud.school.bus.teacherhelper.protocol.ProtocolDef;
import com.cloud.school.bus.teacherhelper.protocol.baserequest.BasePostHttpRequest;

/**
 * 修改学生信息
 * 
 * @author lenovo
 * 
 */
public class ModifyStudentInfoRequest extends BasePostHttpRequest {

	/**
	 * 修改学生信息
	 * 
	 * @param context
	 * @param cnname
	 *            修改昵称
	 * @param sex
	 *            修改性别1为男2为女
	 * @param birthday
	 *            修改生日
	 * @param studentid
	 *            学生id
	 * @param uid
	 *            学生uid
	 * @param enname
	 *            修改姓名
	 */
	public ModifyStudentInfoRequest(Context context, String cnname, String sex,
			String birthday, String studentid, String uid, String enname) {
		super(context);

		HashMap<String, String> requestMap = new HashMap<String, String>();
		if (!TextUtils.isEmpty(cnname)) {
			requestMap.put("cnname", cnname);
		}
		if (!TextUtils.isEmpty(sex)) {
			requestMap.put("sex", sex);
		}
		if (!TextUtils.isEmpty(birthday)) {
			requestMap.put("birthday", birthday);
		}
		if (!TextUtils.isEmpty(studentid)) {
			requestMap.put("studentid", studentid);
		}
		if (!TextUtils.isEmpty(uid)) {
			requestMap.put("uid", uid);
		}
		if (!TextUtils.isEmpty(enname)) {
			requestMap.put("enname", enname);
		}
		setRequestParam(ProtocolDef.METHOD_Modify_Student_Info, requestMap);
	}

}
